|
2020-2021 Sunseeker Telemetry and Lighting System
|
#include "driverlib.h"Go to the source code of this file.
Functions | |
| void | main (void) |
| void | USCI_A0_ISR (void) |
Variables | |
| uint8_t | transmitData = 0x01 |
| uint8_t | receiveData = 0x00 |
| uint8_t | returnValue = STATUS_FAIL |
| void main | ( | void | ) |
Definition at line 79 of file usci_a_spi_ex1_slave.c.
References returnValue, and STATUS_FAIL.
| void USCI_A0_ISR | ( | void | ) |
Definition at line 134 of file usci_a_spi_ex1_slave.c.
References receiveData, and transmitData.
| uint8_t receiveData = 0x00 |
Definition at line 76 of file usci_a_spi_ex1_slave.c.
Referenced by USCI_A0_ISR().
| uint8_t returnValue = STATUS_FAIL |
Definition at line 77 of file usci_a_spi_ex1_slave.c.
Referenced by main().
| uint8_t transmitData = 0x01 |
SPI slave talks to SPI master using 3-wire mode. Data is received from master and data from slave is then transmitted back to master. USCI RX ISR is used to handle communication, CPU normally in LPM4. Prior to initial data exchange, master pulses slaves RST for complete reset. ACLK = ~32.768kHz, MCLK = SMCLK = DCO ~ 1048kHz
Use with SPI Master Incremented Data code example. If the slave is in debug mode, the reset signal from the master will conflict with slave's JTAG; to work around, use IAR's "Release JTAG on Go" on slave device. If breakpoints are set in slave RX ISR, master must stopped also to avoid overrunning slave RXBUF.
MSP430F5438A
-----------------
/|\ | |
| | |
Master—+->|RST | | | | P3.4|-> Data Out (UCA0SIMO) | | | P3.5|<- Data In (UCA0SOMI) | | | P3.0|<- Serial Clock Out (UCA0CLK)
This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:
This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.
Definition at line 76 of file usci_a_spi_ex1_slave.c.
Referenced by USCI_A0_ISR().